<template>
    <hr>
    <p>----------文章组件开始----------</p>
    <h3>标题：{{ title }}</h3>
    <h3>数量：{{ count }}</h3>
    <h3>作者：{{ author }}</h3>
    <h3>时间：{{ pubTime }}</h3>
    <sun-zi></sun-zi>
    <p>----------文章组件结束----------</p>

</template>

<script>
import bus from '../eventBus';
import SunZi from './SunZi.vue';
export default{
    props:['title','author','pubTime'],
    data(){
        return {
            count:0
        }
    },
    created(){
       bus.on('countChange',(counts)=>{
        this.count = counts
       })
    },
    components:{
        'sun-zi':SunZi
    }
}
</script>


<style scoped>

</style>